import Vue from 'vue'
import Router from 'vue-router'
import Footer from '../components/footer/footer'

//  认证
import Register from '../components/register/register'
import DriverRegister from '../components/register/driverRegister'

//  订单
import Order from '../components/order/order'
import OrderDetails from '../components/order/orderDetails'

//  车辆库
import Carbank from '../components/carbank/carbank'

//  下单
import Downorder from '../components/downorder/downorder'
import SiteList from '../components/downorder/siteList'
import DriverList from '../components/downorder/driverList'

//  收货地址
import Takesite from '../components/site/takesite'
import NewTakesite from '../components/site/newTakesite'
import Addsite from '../components/site/addsite'
import CompileSite from '../components/site/compileSite'

//  个人中心
import My from '../components/myself/my'

Vue.use(Router)

export default new Router({
  routes: [
    {
      path: '/',
      name: 'Order',
      component: Order,
      redirect: '/order'
    },
    {
      path:'/footer',
      component:Footer
    },
    //  登录认证
    {
      path:'/register',
      component: Register,
    },
    {
      path:'/driverRegister',
      component: DriverRegister,
    },
    
  //    订单
    {
      path: '/order',
      component: Order,
    },
    {
      path:'/orderDetails',
      component:OrderDetails,
    },
  //    车辆库
    {
      path:'/carbank',
      component: Carbank,
    },
  //    下单
    {
      path:'/downorder',
      component: Downorder,
    },
    {
      path:'/siteList',
      component: SiteList,
    },
    {
      path:'/driverList',
      component: DriverList,
    },
    
  //    收货地址
    {
      path:'/takesite',
      component: Takesite,
    },
    {
      path:'/newTakesite',
      component: NewTakesite,
    },
    {
      path:'/addsite',
      component: Addsite,
    },
    {
      path:'/compileSite',
      component: CompileSite,
    },
  //    个人中心
    {
      path:'/my',
      component: My,
    },
  ]
})
